-
Notifications
You must be signed in to change notification settings - Fork 25
Additional QuantityArray
constructions
#178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
QuantityArray
constructions
Benchmark Results (Julia v1.10)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Hi @MilesCranmer, this PR should be ready for your review now. Two follow-up questions I had were:
|
Sweet, looks like this is working nicely with the new Makie PR: julia> using CairoMakie, DynamicQuantities
julia> x = [6, 7, 8]us"cm"
3-element QuantityArray(::Vector{Float64}, ::Quantity{Float64, SymbolicDimensions{FixedRational{Int32, 25200}}}):
6.0 cm
7.0 cm
8.0 cm
julia> y = (4:6)u"kg"
3-element QuantityArray(::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, ::Quantity{Float64, Dimensions{FixedRational{Int32, 25200}}}):
4.0 kg
5.0 kg
6.0 kg
julia> scatter(x, y) ![]() |
Actually, think I found a good balance, just pushed. Does this look alright to you? |
docs/src/examples.md
Outdated
@@ -281,6 +282,8 @@ f_square(v) = v^2 * 1.5 - v^2 | |||
println("Applying function to y_q: ", sum(f_square.(y_q))) | |||
``` | |||
|
|||
See [Home > Arrays](@ref home_arrays) for more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this ref work btw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, just realized I was assuming that index.md
was the main source, where this works, not the README.md
where it does not. Fixed. 5a59406
docs/src/index.md
Outdated
@@ -0,0 +1,482 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file got mistakenly committed. It is generated during the Documenter build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oop! Fixed. f1b4706
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for this and sorry for the delay. I only had a couple requests
Also re: your question, I think creating from generators is probably too much for now. |
Co-authored-by: Miles Cranmer <[email protected]>
Co-authored-by: Miles Cranmer <[email protected]>
Thanks Miles! Sorry for the mix-up with the README and generated index file; I think things have been straightened out now. In the process, I think I noticed that the HTML table of contents does not work as intended on my end at least, I think due to the case-sensitivity of the section headers. I'd be happy to open up a separate PR for this and maybe exploring the preprocessing step you mentioned for README code blocks if you think that would be useful |
Sure! Sounds great, thanks |
docs/src/examples.md
Outdated
@@ -281,6 +282,8 @@ f_square(v) = v^2 * 1.5 - v^2 | |||
println("Applying function to y_q: ", sum(f_square.(y_q))) | |||
``` | |||
|
|||
See [Home > Arrays](https://ai.damtp.cam.ac.uk/dynamicquantities/stable/#arrays) for more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an absolute path URL; preferably this should be relative in case I ever change the base URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, roger, how's this? 12b20d2
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
==========================================
- Coverage 99.21% 95.62% -3.60%
==========================================
Files 21 20 -1
Lines 1273 1211 -62
==========================================
- Hits 1263 1158 -105
- Misses 10 53 +43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Added a to-do for the method ambiguities picked up by Aqua Note to self: related reading: |
Closes #166
To-do